<?php
$server = 'localhost';
$username = 'rent';
$password = 'rent123';
$database = 'rent';

$conn = new mysqli($server,$username,$password,$database);
if($conn->connect_error){
    echo("数据库连接失败");
}
?>